/*
 * CTemplateCollection.h
 *
 *  Created on: 17.12.2011
 *      Author: Kirill Blinov
 */

#ifndef CTEMPLATECOLLECTION_H_
#define CTEMPLATECOLLECTION_H_

#include "../BasicTypes.h"
//#include "IUnit.h"
#include <map>
#include <string>

class   IUnit;
class 	CHeavyJet;
class	CMediumJet;
class	CLightJet;
class	CRacket;
class	CMilk;
class	CBullet;
class	CBonus;
class	CScenary;

class CTemplateCollection
{
private:
	IUnit* newCurrentUnit;

	std::map<std::string,IUnit*> templates;
public:
	CTemplateCollection();
	virtual ~CTemplateCollection();

	IUnit* CreateUnitInstance( const UNIT_PHYSIC_PARAMS &PhysicParams, const std::string TemplateName,
			                   const std::string UnitName );
	bool AddTemplate( IUnit* Template, const std::string TemplateName );
	void Clear();

	void CreateClone( const CHeavyJet& Pattern );
	void CreateClone( const CMediumJet& Pattern );
	void CreateClone( const CLightJet& Pattern );
	void CreateClone( const CRacket& Pattern );
	void CreateClone( const CMilk& Pattern );
	void CreateClone( const CBullet& Pattern );
	void CreateClone( const CBonus& Pattern );
	void CreateClone( const CScenary& Pattern );
};

#endif /* CTEMPLATECOLLECTION_H_ */
